<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.global.js"></script>
</head>
<body>
    <div class="app">
        <label for="score">
            请输入张三的成绩
            <input type="text" v-model.Number="score">
            <h2>{{result}}</h2>
        </label>
    </div>
    <script>
        const { createApp } = Vue
        createApp({
          data(){
            return{
                score:''
            }
          },
          computed:{
            result(){
                if(this.score>=90){
                    return "张三的成绩优秀"
                }else if(this.score>=75){
                    return "张三的成绩良好"
                }else if(this.score>=60){
                    return "张三的成绩及格"
                }else{
                    return "张三不及格"
                }
            }
          }

        }).mount('.app')
    </script>
</body>
</html>